﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.Diagnostics;


namespace Winz.FoeBot
{
    public partial class SettingsForm : Form
    {
        public SettingsForm()
        {
            InitializeComponent();
            List<MotivationOrdersType> list = Motivator.MotivationOrders.Select(mo => (MotivationOrdersType)mo.Key).ToList(); ;
            defaultMotivationOrderComboBox.DataSource = list;
            botSettingsBindingSource.Add(Bot.settings);
            botSettingsBindingSource.MoveFirst();

        }

        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.ValidateChildren();
            Bot.settings.Save();
            this.Close();
        }

        private void SettingsForm_Enter(object sender, EventArgs e)
        {
            
        }

        private void SettingsForm_Shown(object sender, EventArgs e)
        {
            botSettingsBindingSource.ResetBindings(false);
        }

        private void SettingsForm_Load(object sender, EventArgs e)
        {
            botSettingsBindingSource.ResetBindings(false);
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
